Problem: Let $f(x)=x^2e^x$. $f'(x)=$
Explanation: $f(x)$ is the product of two, more basic, expressions: $x^2$ and $e^x$. Therefore, the derivative of $f$ can be found using the product rule : $\begin{aligned} \dfrac{d}{dx}[u(x)v(x)]&=\dfrac{d}{dx}[u(x)]v(x)+u(x)\dfrac{d}{dx}[v(x)] \\\\ &=u'(x)v(x)+u(x)v'(x) \end{aligned}$ $\begin{aligned} &\phantom{=}f'(x) \\\\ &=\dfrac{d}{dx}(x^2e^x) \\\\ &=\dfrac{d}{dx}(x^2)e^x+x^2\dfrac{d}{dx}(e^x)&&\gray{\text{The product rule}} \\\\ &=2x\cdot e^x+x^2\cdot e^x&&\gray{\text{Differentiate }x^2\text{ and }e^x} \\\\ &=xe^x(2+x)&&\gray{\text{Simplify}} \end{aligned}$ In conclusion, $f'(x)= xe^x(x+2)$ or any other equivalent form.